package com.jwdf.uda.http.action;

import android.content.Context;

import com.jwdf.uda.bean.PbBean;
import com.jwdf.uda.http.AHttpService;
import com.jwdf.uda.http.ApiService;

import retrofit2.Call;

/**
 * 类说明：首页请求
 * 作者：huangqiuxin on 2016/5/11 18:20
 * 邮箱：648859026@qq.com
 */
public class HomeInfoAction extends AHttpService<PbBean.PbResPageGetHomeInfo> {
    /**
     *  首页请求
     * @param context
     * @return
     */
    public static HomeInfoAction newInstance(Context context){
        return new HomeInfoAction(context);
    }

    private HomeInfoAction(Context context) {
        super(context);
    }

    @Override
    protected Call newRetrofitCall(ApiService apiService, PbBean.PbBaseClientInfo.Builder baseBuilder) {
        PbBean.PbReqPageGetHomeInfo.Builder builder = PbBean.PbReqPageGetHomeInfo.newBuilder();
        builder.setBaseClientInfo(baseBuilder);

        return apiService.getHomeInfo(builder.build());
    }

}
